3.53 \(\int \frac{\csc (c+d x)}{(a-a \sin ^2(c+d x))^2} \, dx\)

Optimal. Leaf size=47 \[ \frac{\sec ^3(c+d x)}{3 a^2 d}+\frac{\sec (c+d x)}{a^2 d}-\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d} \]

[Out]

-(ArcTanh[Cos[c + d*x]]/(a^2*d)) + Sec[c + d*x]/(a^2*d) + Sec[c + d*x]^3/(3*a^2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.062176, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3175, 2622, 302, 207} \[ \frac{\sec ^3(c+d x)}{3 a^2 d}+\frac{\sec (c+d x)}{a^2 d}-\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]/(a - a*Sin[c + d*x]^2)^2,x]

[Out]

-(ArcTanh[Cos[c + d*x]]/(a^2*d)) + Sec[c + d*x]/(a^2*d) + Sec[c + d*x]^3/(3*a^2*d)

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 2622

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 302

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\csc (c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx &=\frac{\int \csc (c+d x) \sec ^4(c+d x) \, dx}{a^2}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x^4}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (1+x^2+\frac{1}{-1+x^2}\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=\frac{\sec (c+d x)}{a^2 d}+\frac{\sec ^3(c+d x)}{3 a^2 d}+\frac{\operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=-\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac{\sec (c+d x)}{a^2 d}+\frac{\sec ^3(c+d x)}{3 a^2 d}\\ \end{align*}

Mathematica [A]  time = 0.0411074, size = 61, normalized size = 1.3 \[ \frac{\frac{\sec ^3(c+d x)}{3 d}+\frac{\sec (c+d x)}{d}+\frac{\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{d}-\frac{\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{d}}{a^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]/(a - a*Sin[c + d*x]^2)^2,x]

[Out]

(-(Log[Cos[(c + d*x)/2]]/d) + Log[Sin[(c + d*x)/2]]/d + Sec[c + d*x]/d + Sec[c + d*x]^3/(3*d))/a^2

________________________________________________________________________________________

Maple [A]  time = 0.065, size = 67, normalized size = 1.4 \begin{align*}{\frac{\ln \left ( -1+\cos \left ( dx+c \right ) \right ) }{2\,{a}^{2}d}}-{\frac{\ln \left ( 1+\cos \left ( dx+c \right ) \right ) }{2\,{a}^{2}d}}+{\frac{1}{3\,{a}^{2}d \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}+{\frac{1}{{a}^{2}d\cos \left ( dx+c \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)/(a-sin(d*x+c)^2*a)^2,x)

[Out]

1/2/d/a^2*ln(-1+cos(d*x+c))-1/2/d/a^2*ln(1+cos(d*x+c))+1/3/d/a^2/cos(d*x+c)^3+1/d/a^2/cos(d*x+c)

________________________________________________________________________________________

Maxima [A]  time = 0.950793, size = 80, normalized size = 1.7 \begin{align*} -\frac{\frac{3 \, \log \left (\cos \left (d x + c\right ) + 1\right )}{a^{2}} - \frac{3 \, \log \left (\cos \left (d x + c\right ) - 1\right )}{a^{2}} - \frac{2 \,{\left (3 \, \cos \left (d x + c\right )^{2} + 1\right )}}{a^{2} \cos \left (d x + c\right )^{3}}}{6 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

-1/6*(3*log(cos(d*x + c) + 1)/a^2 - 3*log(cos(d*x + c) - 1)/a^2 - 2*(3*cos(d*x + c)^2 + 1)/(a^2*cos(d*x + c)^3
))/d

________________________________________________________________________________________

Fricas [A]  time = 1.69111, size = 198, normalized size = 4.21 \begin{align*} -\frac{3 \, \cos \left (d x + c\right )^{3} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 3 \, \cos \left (d x + c\right )^{3} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 6 \, \cos \left (d x + c\right )^{2} - 2}{6 \, a^{2} d \cos \left (d x + c\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

-1/6*(3*cos(d*x + c)^3*log(1/2*cos(d*x + c) + 1/2) - 3*cos(d*x + c)^3*log(-1/2*cos(d*x + c) + 1/2) - 6*cos(d*x
 + c)^2 - 2)/(a^2*d*cos(d*x + c)^3)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\csc{\left (c + d x \right )}}{\sin ^{4}{\left (c + d x \right )} - 2 \sin ^{2}{\left (c + d x \right )} + 1}\, dx}{a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)**2)**2,x)

[Out]

Integral(csc(c + d*x)/(sin(c + d*x)**4 - 2*sin(c + d*x)**2 + 1), x)/a**2

________________________________________________________________________________________

Giac [B]  time = 1.17125, size = 144, normalized size = 3.06 \begin{align*} \frac{\frac{3 \, \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{2}} + \frac{8 \,{\left (\frac{3 \,{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac{3 \,{\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 2\right )}}{a^{2}{\left (\frac{\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{3}}}{6 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/6*(3*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/a^2 + 8*(3*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 3*
(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + 2)/(a^2*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)^3))/d